package cn.edu.neusoft.yuejian12.Model;

import java.util.List;

import cn.edu.neusoft.yuejian12.JavaBean.Activity;
import cn.edu.neusoft.yuejian12.Service.ActivityService;
import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;

/**
 * Created by 木子李 on 2017/10/16.
 */

public class ActivityModel {
    private Retrofit retrofit;
    public ActivityModel(){
        retrofit = new Retrofit.Builder()
                .baseUrl("http://172.24.10.175/workout/api.php/")
                .addConverterFactory(GsonConverterFactory.create())
                .build();
    }
    public Call<List<Activity>> getAllActivity()
    {
        ActivityService activityService=retrofit.create(ActivityService.class);
        return  activityService.getAllActivity();
    }

}
